<%--
  Created by IntelliJ IDEA.
  User: leman
  Date: 2017/7/18
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<button class="layui-btn layui-btn-normal layui-btn-small" ng-click="seaToggle()">查询账单</button>
<button class="layui-btn layui-btn-small" ng-click="active.paymentBtn()">付款确认</button>
<button class="layui-btn layui-btn-small" ng-click="exportPayment()">导出账单</button>
<div id="seaBox" ng-hide="mySea">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">承运方</label>
            <div class="layui-input-inline">
                <select class="valName sel" ng-model="carrierId" ng-options="x.carrierId as x.carrierName for x in data.carrierList">
                    <option value="" >--选择承运方--</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">账单编号</label>
            <div class="layui-input-inline">
                <input type="tel" class="layui-input valName" ng-model="billCode">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">付款状态</label>
            <div class="layui-input-inline">
                <select class="layui-input valName" ng-model="payStatus" ng-options="x.id as x.name for x in selectOptions">
                    <option value="" >--选择付款状态--</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">账单日期</label>
        <div class="layui-input-inline">
            <input class="layui-input valName" placeholder="开始日期" ng-model="billDateStart" ng-click="getTime($event,'billDateStart')" readonly="readonly">
        </div>
        <div class="layui-input-inline">
            <input class="layui-input valName" placeholder="截止日期" ng-model="billDateEnd"  ng-click="getTimeEnd($event,'billDateEnd')" readonly="readonly">
        </div>
    </div>
    <div class="layui-input-inline" style="text-align: center;width: 100%;">
        <button class="layui-btn layui-btn-normal" ng-click="resetBtn()">重置</button>
        <button class="layui-btn" ng-click="seaBtn()">查询</button>
    </div>
</div>
<div style="overflow-x:auto;">
    <table class="layui-table" style="min-width: 1300px;max-width: 2000px;margin-bottom: 0;">
        <tr>
            <th><input type="checkbox" ng-model="selectAll" ng-click="all(selectAll)"></th>
            <th>账单编号</th>
            <th>承运方</th>
            <th>账单日期</th>
            <th>运单金额</th>
            <th>调整金额</th>
            <th>结算金额</th>
            <th>账单状态</th>
            <th>发票状态</th>
            <th>付款状态</th>
            <th>创建人</th>
            <th>创建时间</th>
        </tr>
        <tr ng-repeat="x in data.list">
            <td ><input type="checkbox" ng-checked="selectAll" ng-model="person.state" ng-click="select(selected)" name="id_name" value="{{ x.id+'-'+x.payStatus }}"></td>
            <td  ng-bind="x.billCode"> </td>
            <td  ng-bind="x.carrierName"> </td>
            <td  ng-bind="x.billDate.substring(0,11)">   </td>
            <td  ng-bind="x.waybillCost"> </td>
            <td  ng-bind="x.alterCost"> </td>
            <td  ng-bind="x.settleCost"></td>
            <td  ng-bind="x.billStatus=='10'?'未对账': (x.billStatus=='20'?'已确认' : ( x.billStatus=='30'?'已结账':''))"></td>
            <td  ng-bind="x.invoiceStatus=='10'?'不开票': (x.invoiceStatus=='20'?'待收票' : ( x.invoiceStatus=='30'?'已收票':''))"></td>
            <td  ng-bind="x.payStatus=='10'?'未付款': (x.payStatus=='20'?'部分付款' : ( x.payStatus=='30'?'付款完成':''))"></td>
            <td  ng-bind="x.createUser"></td>
            <td  ng-bind="x.gmtCreate"></td>
        </tr>
    </table>
</div>
<div style="float:right;">
    <ul class="layui-box layui-laypage layui-laypage-default">
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==1]" href="javascript:void(0);" ng-click="p_index(this)">首页</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==1]" href="javascript:void(0);" ng-click="prev_page(this)">上一页</a>
        </li>
        <%--这块是显示多少页的--%>
        <li ng-repeat="page in pages" ng-class="{true:'active'}[p_current==page]">
            <a class="layui-laypage-curr" href="javascript:void(0);" ng-click="load_page(page)">{{ page }}</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==p_all_page]" href="javascript:void(0);" ng-click="next_page(this)">下一页</a>
        </li>
        <li>
            <a ng-class="{true:'layui-btn-disabled'}[p_current==p_all_page]" href="javascript:void(0);" ng-click="p_last()">尾页</a>
        </li>
    </ul>
    <span>共{{count}}条</span>
    <span style="padding-left: 10px;">到第
        <input id="on" type="text" value="{{p_current}}"/>页
        <button class="layui-btn layui-btn-small" ng-click="goBtn()" style="margin-top: -5px;">确定</button>
    </span>
</div>

